// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FA_USED
// * CreateDate    : 2012/3/12 17:00:34
// * Creater       : CodeSmith
// * LastChangeDate: 2012/3/12 17:00:34
// * LastChanger   : 2012/3/12 17:00:34
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Fa
{
/// <summary>
    /// FaUsed
    /// </summary>
    public partial class FaUsedBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objFaUsedEntity">Entity</param>
        /// <returns>Entity</returns>
        public static FaUsedEntity GetFaUsed(FaUsedEntity objFaUsedEntity)
        {
            return DataAccess.SelectSingle<FaUsedEntity>(objFaUsedEntity);
        }
        public static FaUsedEntity GetByID(string assetId)
        {
            if (string.IsNullOrEmpty(assetId))
            {
                return null;
            }
            FaUsedEntity entity = new FaUsedEntity();
            entity.AssetId = assetId;
            return DataAccess.SelectSingle<FaUsedEntity>(entity);
        }
        #endregion

        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objFaUsedEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertFaUsed(FaUsedEntity objFaUsedEntity)
        {
            return DataAccess.Insert(objFaUsedEntity);
        }

        public static bool InsertFaUsed(List<FaUsedEntity> objFaUsedEntityList)
        {
            return DataAccess.Insert(objFaUsedEntityList);
        }
        #endregion

        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objFaUsedEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateFaUsed(FaUsedEntity objFaUsedEntity)
        {
            return DataAccess.Update(objFaUsedEntity);
        }

        public static bool UpdateFaUsed(List<FaUsedEntity> objFaUsedEntityList)
        {
            return DataAccess.Update<FaUsedEntity>(objFaUsedEntityList);
        }
        #endregion

        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objFaUsedEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteFaUsed(FaUsedEntity objFaUsedEntity)
        {
            return DataAccess.Delete(objFaUsedEntity);
        }

        public static bool DeleteFaUsed(List<FaUsedEntity> objFaUsedEntityList)
        {
            return DataAccess.Delete<FaUsedEntity>(objFaUsedEntityList);
        }
        #endregion

        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetFaUsedAll()
        {
            return DataAccess.SelectAllDataSet<FaUsedEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<FaUsedEntity> GetFaUsedAllList()
        {
            return DataAccess.SelectAll<FaUsedEntity>();
        }
        #endregion
	}
	
	
}	

